<template>
  <div>
    <div class="serve">
      <!-- <div class="serve-zi">{{ xtitle.nameEnglish }}</div> -->
      <div class="serve-tltie">
        <h3>{{ xtitle.name }}</h3>
      </div>
      <div class="acolor" v-if="CurrentName == 'frontPage'">
        纯粮酷造·天然洞藏
      </div>
      <div class="serve-subtitle" v-else>纯粮酷造·天然洞藏</div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["xtitle"],

  name: "Xtltie",
  data() {
    return {
      CurrentName: "",
    };
  },
  mounted() {
    this.route();
  },
  methods: {
    route() {
      // 获取当前路由name
      this.CurrentName = this.$route.name;
      console.log(123, this.CurrentName);
    },
  },
};
</script>

<style lang="less" scoped >
@media screen and (min-width: 1029px) {
  // 服务项目
  .serve {
    .serve-zi {
      font-size: 40px;
      letter-spacing: 15px;
      color: #eeeeee;
      text-transform: uppercase;
    }
    .serve-tltie {
      margin-top: 52px;
      background: url("../assets/images/fw-lr.jpg") center;
      h3 {
        width: 200px;
        margin: auto;
        background-color: #ffffff;
        padding: 0 8px;
        font-weight: bold;
        font-size: 44px;
        color: #e50c09;
        white-space: nowrap;
      }
    }
    .acolor {
      font-size: 24px;
      letter-spacing: 12px;
      color: #000000;
    }
    .serve-subtitle {
      font-size: 24px;
      letter-spacing: 12px;
      color: #eeeeee;
    }
  }
}
@media only screen and (min-width: 750px) and (max-width: 1028px) {
  // 服务项目
  .serve {
    .serve-zi {
      font-size: 20px;
      letter-spacing: 15px;
      color: #eeeeee;
      text-transform: uppercase;
    }
    .serve-tltie {
      margin-top: 52px;
      background: url("../assets/images/fw-lr.jpg");
      h3 {
        width: 100px;
        margin: auto;
        background-color: #ffffff;
        padding: 0 8px;
        font-weight: bold;
        font-size: 22px;
        color: #e50c09;
        white-space: nowrap;
      }
    }
    .acolor {
      font-size: 16px;
      letter-spacing: 12px;
      color: #000000;
    }
    .serve-subtitle {
      font-size: 16px;
      letter-spacing: 12px;
      color: #eeeeee;
    }
  }
}
@media screen and (max-width: 749px) {
  // 服务项目
  .serve {
    .serve-zi {
      font-size: 12px;
      letter-spacing: 15px;
      color: #eeeeee;
      text-transform: uppercase;
    }
    .serve-tltie {
      margin-top: 26px;
      background: url("../assets/images/fw-lr.jpg") center;
      h3 {
        width: 50px;
        margin: auto;
        background-color: #ffffff;
        padding: 0 8px;
        font-weight: bold;
        font-size: 12px;
        color: #e50c09;
        white-space: nowrap;
      }
    }
    .acolor {
      font-size: 12px;
      letter-spacing: 12px;
      color: #000000;
    }
    .serve-subtitle {
      font-size: 14px;
      letter-spacing: 12px;
      color: #eeeeee;
    }
  }
}
</style>